/**
 * @project Devkits
 * @file mainwindow.cpp
 * @author rui.liang (rui.liang@ruhnix.com)
 * @date 2022/11/29 23:56:17
 */

#include "Homepage.h"

#include <QDebug>
#include <QDir>
#include <QFileDialog>
#include <QSettings>

#include <boost/range/iterator_range.hpp>

#include "BuildInfo.h"
#include "ui_Homepage.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindow) {
    ui->setupUi(this);

    initUi();
    initSettings();
    initConnect();
}

MainWindow::~MainWindow() { delete ui; }

void MainWindow::initUi() {

    // 设置主窗口名称
    this->setWindowTitle(
        QString("%1 V%2").arg(SAMPLE_PROJECT_NAME, SAMPLE_PROJECT_VERSION));

    // 设置日志
    m_logger = new Logger(ui->appLog, this);
}

void MainWindow::initSettings() {
    // 读取上次保存的设置
    QSettings settings("config.ini", QSettings::IniFormat);
}

void MainWindow::initConnect() {
    // 连接信号和槽
}
